import axios from '@/utils/axios'

// 分页查询工单
export const fetchOrderAPI = (data) => {
  return axios.post('/api/order/order-client/cms/repairOrder/queryPageList', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 新增工单
export const addOrderAPI = (data) => {
  return axios.post('/api/order/order-client/cms/repairOrder/addOrder', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 编辑工单
export const updateOrderAPI = (data) => {
  return axios.post('/api/order/order-client/cms/repairOrder/updateOrder', data, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}

// 删除工单
export const deleteOrderAPI = (id) => {
  return axios.post(`/api/order/order-client/cms/repairOrder/deleteOrder?id=${id}`, {}, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
